<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!doctype html>
<html lang="en"><head>
    <meta charset="utf-8">
    <title>请登录</title>
   <%@include file="/WEB-INF/jsp/common/top_resources.jsp"%>
<!--右键和消息弹框提醒-->
	<link rel="stylesheet" href="${_root}/resources/css/toastr.css">
	<link rel="stylesheet" href="${_root}/resources/css/highlight-8.6.default.min.css">
	<script type="text/javascript" src="${_root}/resources/js/BootstrapMenu.min.js" ></script>
	<script type="text/javascript" src="${_root}/resources/js/toastr.js" ></script>
	<script type="text/javascript" src="${_root}/resources/js/highlight-8.6.default.min.js" ></script>
</head>
<body class=" theme-blue">
		<script type="text/javascript">
			$(function(){
				var msg = '${msg}';
				if(msg){
					toastr.info(msg);
				}
			})
		</script>
	<%@include file="/WEB-INF/jsp/common/top.jsp"%>
        <div class="dialog">
    <div class="panel panel-default">
        <p class="panel-heading no-collapse">登录</p>
        <div class="panel-body">
            <form action="${_root}/login" method="post" name="login">
                <div class="form-group">
                    <label>账号:</label>
                    <input type="text" name="login" class="form-control span12" placeholder="请输入用户名或邮箱" >
                </div>
                <div class="form-group">
                <label>密码:</label>
                    <input type="password" name="pwd" class="form-control span12 form-control" placeholder="请输入密码">
                </div>
                <input type="submit" class="btn btn-primary pull-right" value="登录"/>
                <label class="remember-me"><input type="checkbox" name="rember" value="1"> Remember me</label>
                <div class="clearfix"></div>
            </form>
        </div>
    </div>
</div>

	<!-- 底部资源 -->
	<%@include file="/WEB-INF/jsp/common/buttom_resources.jsp"%>
	<!-- 自定义js代码 -->
	<script type="text/javascript">
	//为表单注册验证器
	$(document).ready(function(){
		$(document.forms['login']).formValidation({
			message:'不是有效的值',
			icon:{
				valid: 'glyphicon glyphicon-ok',
	            invalid: 'glyphicon glyphicon-remove',
	            validating: 'glyphicon glyphicon-refresh'
			},
			//要验证的域
			fields:{
    				login:{
    					message:'名字不能够为空',
    					validators:{
    						notEmpty:{
    							message:'请输入用户名'
    						},
    						stringLength:{
    							min:6,
    							max:30,
    							message:'用户名必须在6-30个字符之间'
    						}
    					}
    				},
    				pwd: {
	                validators: {
	                    notEmpty: {
	                        message: '密码不能够为空'
	                    },
	                    stringLength:{
							min:6,
							max:15,
							message:'密码必须在6-15位之间'
						}
	                }
	            }				
			}
		});
	});			 
	</script>

</body>
</html>
